<template>
<!--  回转分区物质组成的表格-->
  <div>
    <el-table
        :data="tableData"
        style="width: 100%"
        :border="true"
    >
      <el-table-column
          prop="header"
          label="字段"
      ></el-table-column>
      <el-table-column
          prop="value"
          label="数值"
      ></el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "Resolve_Table",
  props:{
    Compose:{
      type:Object
    },

  },
  data(){
    return{
      tableData:[]
    }
  },
  methods:{
    getHeader(key) {
      // 在此处定义对应关系
      const headerMap = {
        HNO3_compose: "硝酸浓度（mol/L)",
        Ur_compose: "硝酸酰铀浓度（mol/L）",
        t_compose: "溶液铀中浓度达到标准所需时间(min)",
        // judge: "判断",
      };
      return headerMap[key] || key;
      // return headerMap[key] || key;

    }
  },
  mounted() {
    this.tableData = Object.keys(this.Compose)
        .filter(key => key !== 'judge')
        .map(key => {
          return {
            header: this.getHeader(key),
            value: this.Compose[key],
          };
        });

  }

}
</script>

<style scoped>

</style>